#include <iostream>
using namespace std;

class Base{
    public:
        void f(){
            cout<<"This is Base"<<endl;
        }
};

class Child:public Base{
    public:
        void f(){
            cout<<"This is Child"<<endl;
        }
};

int main(){
    Child * obj =new Child();
    Base * baseobj=(Base*)obj;
    obj->f();
    baseobj->f();
    delete obj;
    return 0;
}
